﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using TestDLL.business.service;

public partial class test_dll : System.Web.UI.Page
{
    private TestService testService = new TestService();
    private Random random = new Random();
    protected void Page_Load(object sender, EventArgs e)
    {
        Guestbook.domain.GuestBook guetBook = Guestbook.domain.GuestBook.Load(1);
        string action = Request.QueryString["action"];
        if (!string.IsNullOrEmpty("action"))
        {
            switch (action)
            {
                case "add":
                    testService.addTest(random.Next(1000).ToString(), random.Next(100000).ToString());
                    break;
            }
        }

        GridView1.DataSource = testService.getAllTestItems();
        GridView1.DataBind();

    }
}
